
import request from '../../utils/request.js'

const state = {
	categoryList:[]
}

const mutations = {
	SET_CATEGORYLIST(state,categoryList){
		state.categoryList = categoryList
	}
}

const actions = {
	async getCategoryList({commit}){
		let result = await request('/categoryList')
		console.log(result)
		commit('SET_CATEGORYLIST',result.data)
	}
}

const getters = {}

export default {
	namespaced:true,
	state,
	mutations,
	actions,
	getters

}
